import { Empty } from 'antd'
import { Navigate } from 'react-router-dom'
import { globalConfig } from '@/globalConfig'
import './notFound.styl'

function PrivateRoute(props) {
  return localStorage.getItem(globalConfig.SESSION_LOGIN_INFO) ? props.children : <Navigate to='/login' />
}

function notFound() {
  return (
    <PrivateRoute>
      <div className='P-notFound'>
        <Empty description='未知页面' />
      </div>
    </PrivateRoute>
  )
  
}

export default notFound
